package com.symria.server.po;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Formula;

/**
 * AdCampaign entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "AD_CAMPAIGN")
public class AdCampaign implements java.io.Serializable {

	// Fields

	private Integer adId;
	private Integer userId;
	private String userName;
	private String adName;
	private Date createDate;
	private Date beginDate;
	private Date endDate;
	private String isLimitSet;
	private Double price;
	private Double dayLimit;
	private Integer showLimit;
	private Integer adAppCate;
	private String status;
	private String adDesc;
	private String areaSet;
	private String os;
	private String hourSet;
	private String padSet;
	private String operatorSet;
	private String netSet;
	private String adCate;
	private String adType;

	// Constructors

	/** default constructor */
	public AdCampaign() {
	}

	/** full constructor */
	public AdCampaign(Integer userId, String adName, Date createDate,
			Date beginDate, Date endDate, String isLimitSet,
			Double price, Double dayLimit, Integer adAppCate, String status,
			String adDesc, String areaSet, String operatorSet, String netSet,
			String adCate, String adType) {
		this.userId = userId;
		this.adName = adName;
		this.createDate = createDate;
		this.beginDate = beginDate;
		this.endDate = endDate;
		this.isLimitSet = isLimitSet;
		this.price = price;
		this.dayLimit = dayLimit;
		this.adAppCate = adAppCate;
		this.status = status;
		this.adDesc = adDesc;
		this.areaSet = areaSet;
		this.operatorSet = operatorSet;
		this.netSet = netSet;
		this.adCate = adCate;
		this.adType = adType;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "AD_ID", unique = true, nullable = false)
	public Integer getAdId() {
		return this.adId;
	}

	public void setAdId(Integer adId) {
		this.adId = adId;
	}
	
	@Column(name = "PAD_SET")
	public String getPadSet() {
		return padSet;
	}

	public void setPadSet(String padSet) {
		this.padSet = padSet;
	}

	@Column(name = "OS")
	public String getOs() {
		return os;
	}

	public void setOs(String os) {
		this.os = os;
	}
	@Column(name = "HOUR_SET")
	public String getHourSet() {
		return hourSet;
	}

	public void setHourSet(String hourSet) {
		this.hourSet = hourSet;
	}

	@Column(name = "USER_ID")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	
	@Formula("(SELECT ci.COM_NAME FROM CUSTOM_INFO ci WHERE ci.ID=USER_ID)")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "AD_NAME", length = 64)
	public String getAdName() {
		return this.adName;
	}

	public void setAdName(String adName) {
		this.adName = adName;
	}

	@Column(name = "CREATE_DATE", length = 0)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "BEGIN_DATE", length = 0)
	public Date getBeginDate() {
		return this.beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	@Column(name = "END_DATE", length = 0)
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Column(name = "IS_LIMIT_SET", length = 1)
	public String getIsLimitSet() {
		return this.isLimitSet;
	}

	public void setIsLimitSet(String isLimitSet) {
		this.isLimitSet = isLimitSet;
	}

	@Column(name = "PRICE", precision = 16, scale = 4)
	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	@Column(name = "DAY_LIMIT", precision = 16, scale = 4)
	public Double getDayLimit() {
		return this.dayLimit;
	}

	public void setDayLimit(Double dayLimit) {
		this.dayLimit = dayLimit;
	}

	@Column(name = "AD_APP_CATE")
	public Integer getAdAppCate() {
		return this.adAppCate;
	}

	public void setAdAppCate(Integer adAppCate) {
		this.adAppCate = adAppCate;
	}

	@Column(name = "STATUS", length = 1)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "AD_DESC", length = 512)
	public String getAdDesc() {
		return this.adDesc;
	}

	public void setAdDesc(String adDesc) {
		this.adDesc = adDesc;
	}

	@Column(name = "AREA_SET", length = 1)
	public String getAreaSet() {
		return this.areaSet;
	}

	public void setAreaSet(String areaSet) {
		this.areaSet = areaSet;
	}

	@Column(name = "OPERATOR_SET", length = 1)
	public String getOperatorSet() {
		return this.operatorSet;
	}

	public void setOperatorSet(String operatorSet) {
		this.operatorSet = operatorSet;
	}

	@Column(name = "NET_SET", length = 1)
	public String getNetSet() {
		return this.netSet;
	}

	public void setNetSet(String netSet) {
		this.netSet = netSet;
	}

	@Column(name = "AD_CATE", length = 8)
	public String getAdCate() {
		return this.adCate;
	}

	public void setAdCate(String adCate) {
		this.adCate = adCate;
	}

	@Column(name = "AD_TYPE", length = 8)
	public String getAdType() {
		return this.adType;
	}

	public void setAdType(String adType) {
		this.adType = adType;
	}
	@Column(name = "SHOW_LIMIT", length = 8)
	public Integer getShowLimit() {
		return showLimit;
	}

	public void setShowLimit(Integer showLimit) {
		this.showLimit = showLimit;
	}
	
	

}